#include "stm32f10x.h"
#include "OLED.h"
#include "Encoder.h"
#include "Delay.h"
int ON=1,OFF=0;
int main(void)
{
	int16_t a,b;
	int16_t digits;
	OLED_Init();
	Encoder_Init();
	while(1)
	{ 
		a=Encoder_Get();
	    digits=1;
		if(a>=0)
			b=a;
		else if(a<0)
			b=-a;
		
		while(b)
		{
			b/=10;
			digits++;
		}
		OLED_ShowSignedNum(1,1,a,5);
		Delay_ms(5);
		
	}
}
	